-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add support for analysis mode #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for analysis mode #15
Conversation
5737ac4 to
c4f95c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for a new "analysis" integration mode, allowing the instrumentation hooks to operate in three distinct modes: Valgrind, Perf, and Analysis. The implementation refactors existing code to use a common helper for FIFO-based instruments.
- Introduces the
IntegrationModeenum and related protocol commands for mode detection - Creates a generic
FifoInstrumenthelper that validates the integration mode during initialization - Refactors
PerfInstrumentto use the new helper and moves related code torunner_fifo.zig
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared.zig | Adds IntegrationMode enum and new Command variants for integration mode queries |
| src/runner_fifo.zig | New file containing refactored FIFO communication logic from perf.zig with mode detection |
| src/instruments/helper.zig | New generic FifoInstrument function that creates mode-validated instrument implementations |
| src/instruments/perf.zig | Refactored to use FifoInstrument helper, significantly reduced code |
| src/instruments/analysis.zig | New analysis instrument using the FifoInstrument helper |
| src/instruments/valgrind.zig | Updated init to return error when not instrumented for consistency |
| src/instruments/root.zig | Updated to support analysis mode with proper initialization order and delegation |
| src/c.zig | Removed protocol version validation logic (moved to runner_fifo.zig) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4ecb2f7 to
d673228
Compare
d673228 to
a19e8c3
Compare
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
olgtm
3224a77 to
a36c4d7
Compare
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
olgtm
a36c4d7 to
dfad349
Compare
dfad349 to
075ad83
Compare
No description provided.